<%@page import="models.RouteModel"%>
<%@page import="java.util.List"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	List<RouteModel> listRoute = (List<RouteModel>) request.getAttribute("listRoute");
%>

<jsp:include page="/admin/layouts/header.jsp">
    <jsp:param name="language" value="1" />
</jsp:include>

<script type="text/javascript" src="/admin/js/list_router.js"></script>

        <div class="maincontent noright">
        	<div class="maincontentinner">
            	
                <ul class="maintabmenu">
                	<li class="current"><a href="/admin/route/list">Quản lý tuyến</a></li>
                	<li><a href="/admin/route/add">Cấu hình tuyến</a></li>
                </ul><!--maintabmenu-->
                
                <div class="content">
                	<div class="contenttitle radiusbottom0">
	                	<h2 class="table"><span>Danh sách tuyến</span></h2>
	                </div>              
	                
	                <table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
	                    <colgroup>
	                        <col class="con0">
	                        <col class="con1">
	                        <col class="con0">
	                    </colgroup>
	                    <thead>
	                        <tr>
	                        	<th class="head0">Tên tuyến</th>
	                            <th class="head1">Mô tả</th>
	                            <th class="head0">Địa điểm</th>
	                            <th class="head1">Action</th>	                           
	                        </tr>
	                    </thead>
	                    <tfoot>
	                        <tr>
	                        	<th class="head0">Tên tuyến</th>
	                            <th class="head1">Mô tả</th>
	                            <th class="head0">Địa điểm</th>
	                            <th class="head1">Action</th>	
	                        </tr>
	                    </tfoot>
	                    <tbody>
	                    	<% for (int i = 0; i < listRoute.size(); i++) { %>
	                        <tr>
	                        	<td class="center"><%=listRoute.get(i).getName() %></td>
	                            <td><%=listRoute.get(i).getDescription() %></td>
	                            <td><%=listRoute.get(i).getListGeoName()%></td>	                           
	                            <td class="center">	
	                            	<a title="Remove Link" href="/admin/route/edit/<%=listRoute.get(i).getId()%>">
										Edit
									</a>	
									 |							
									<a title="Remove Link" href="/admin/route/delete/<%=listRoute.get(i).getId()%>" id="action_del" class="delete" onClick="if(!confirm('Bạn có chắc chắn muốn xóa tuyến <%=listRoute.get(i).getName() %>?')) return false;">
										Delete
									</a>
								</td>
	                        </tr>
	                        <% } %>
	                    </tbody>
	                </table>
                </div><!--content-->
                
            </div><!--maincontentinner-->
            
            <jsp:include page="/admin/elements/copyright.jsp">
            	<jsp:param name="language" value="1" />
			</jsp:include>
            
        </div><!--maincontent-->
        
<jsp:include page="/admin/layouts/footer.jsp">
    <jsp:param name="language" value="1" />
</jsp:include>